<?php
/* 
 * Copyright (c) 2018-2021   All rights reserved.
 * 
 * 创建时间：2021-05-06 09:59
 *
 * 项目：upload  -  $  - sql.php
 *
 * 作者：liwei 
 */

!defined('INLEV') && exit('Access Denied LEV');

$charset = Lev::$app['db']['charset'];
$tableNames = [
    '{{%levmodules_merge}}',
];

$sql = \lev\base\Migrationv::getLevBaseTableCreateSql();

$sql.= <<<EOF

CREATE TABLE IF NOT EXISTS `{{%levmodules_merge}}` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `descs` varchar(255) NOT NULL DEFAULT '' COMMENT '压缩备注',
  `mainiden` varchar(255) NOT NULL DEFAULT '' COMMENT '压缩主模块Iden',
  `hidelevs` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '隐藏levs模块',
  `adminiden` varchar(100) NOT NULL DEFAULT '' COMMENT '管理模块Iden',
  `adminroute` varchar(100) NOT NULL DEFAULT '' COMMENT '管理模块路由',
  `adminclassify` varchar(100) NOT NULL DEFAULT '' COMMENT '管理模块设置分类',
  `idens` text NOT NULL COMMENT '合并压缩模块idens',
  `settings` mediumtext NOT NULL COMMENT '通用设置',
  `status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '状态',
  `uptime` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '更新时间',
  `addtime` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '添加时间',
  PRIMARY KEY (`id`)
) $tableOptions;

EOF;

return [
    0 => $sql,
    1 => $tableNames
];
